Skip to content

feat: 프로필 이미지 연결 완료#150

Merged
surfwithus merged 1 commit intomainfrom
feat/pfp_image_api
Aug 18, 2025
Merged

feat: 프로필 이미지 연결 완료#150
surfwithus merged 1 commit intomainfrom
feat/pfp_image_api

Conversation

@surfwithus
Copy link
Collaborator

@surfwithus surfwithus commented Aug 18, 2025

Summary by CodeRabbit

  • 신기능
    • 프로필 아이콘 선택 기능 확장(9개 아이콘) 및 선택 필수 안내. 선택한 아이콘을 회원가입에 반영.
  • 개선
    • 로그인 후 프로필 아이콘이 저장·동기화되어 홈/가족/사진 상세·날짜/마이페이지 등에서 동적으로 표시.
    • 가족 걸음 수·사진 데이터 동시 로드로 초기 로딩 체감 개선.
    • 기본 이미지 및 예외 상황에 대한 안전한 기본값 처리로 안정성 향상.
  • 스타일
    • 색상 투명도와 여백 등 소소한 UI 표현 정리.

@coderabbitai
Copy link

coderabbitai bot commented Aug 18, 2025

Caution

Review failed

The pull request is closed.

Walkthrough

프로필 이미지 관리 체계가 profileImageId 기반으로 전환되었습니다. 회원가입·로그인·설정 저장 로직과 여러 화면(UI)이 이 ID를 사용해 동적 에셋 경로를 로드하도록 수정되었습니다. 일부 화면은 Future.wait로 가족 정보와 콘텐츠를 병렬 로드하며, Stateless → Stateful 전환이 포함됩니다.

Changes

Cohort / File(s) Summary
Prefs/Utilities: Profile Image ID & Path Helpers
frontend/ongi/lib/utils/prefs_manager.dart
profileImageId 저장/조회 API 추가, getUserInfo 반환 형식 변경(Map<String, dynamic>·profileImageId 포함), 로그아웃 키 정렬, 프로필 이미지 경로 계산 헬퍼 3종 추가(getProfileImagePath, …ByUserId, …ByUserName).
Auth/Signup Flow: Capture & Persist profileImageId
frontend/ongi/lib/services/signup_service.dart, frontend/ongi/lib/screens/signup/mode_screen.dart, frontend/ongi/lib/screens/signup/profilepic_screen.dart, frontend/ongi/lib/services/login_service.dart
SignupService.register에 profileImageId 파라미터 추가 및 전송, 프로필 아이콘 선택/검증/저장(profileImageId) 로직 추가, 회원가입 화면에서 SharedPreferences에서 profileImageId 읽어 전달, 로그인 시 응답의 profileImageId 저장.
UI Screens: Dynamic Profile Image & Parallel Loads
frontend/ongi/lib/screens/home/home_ourfamily_text.dart, frontend/ongi/lib/screens/photo/detail_record_screen.dart, frontend/ongi/lib/screens/mypage/mypage_myinfo.dart, frontend/ongi/lib/screens/health/family_step_tracker_screen.dart, frontend/ongi/lib/screens/photo/photo_date_screen.dart
정적 에셋 → PrefsManager 기반 동적 경로 로딩(FutureBuilder 활용), Myinfo를 StatefulWidget로 변경, 가족 구성원 데이터 병렬 로드(Future.wait) 도입, 가족 목록을 사용한 사용자명/ID 기반 이미지 경로 해석 추가, 경미한 스타일·포맷 변경.

Sequence Diagram(s)

sequenceDiagram
  participant U as User
  participant PS as ProfilepicScreen
  participant SP as SharedPreferences(PrefsManager)
  participant MS as ModeScreen
  participant SS as SignupService
  participant LS as LoginService

  U->>PS: 아이콘 선택
  PS->>SP: signup_username, signup_profileImageId 저장
  U->>MS: 다음(역할 선택/진행)
  MS->>SP: signup_profileImageId 읽기
  MS->>SS: register(email, password, name, isParent, profileImageId)
  SS-->>MS: 등록 성공 응답
  MS->>LS: login(email, password)
  LS->>SP: accessToken, userInfo(profileImageId) 저장
  LS-->>MS: 로그인 성공
Loading
sequenceDiagram
  participant UI as Screen(UI)
  participant FS as FamilyService
  participant PM as PrefsManager

  UI->>UI: Future.wait([fetchSteps/Logs, getFamilyMembers])
  UI-->>UI: stepResult / maumLogResponse, familyMembers
  UI->>PM: getProfileImagePathByUserId/ByUserName(..., familyMembers)
  PM-->>UI: 에셋 경로 반환(기본값 포함)
  UI->>UI: 이미지 렌더링
Loading
sequenceDiagram
  participant UI as UI(FutureBuilder)
  participant PM as PrefsManager

  UI->>PM: getUserInfo()
  PM-->>UI: { profileImageId }
  UI->>PM: getProfileImagePath(profileImageId)
  PM-->>UI: assets/...png
  UI->>UI: CircleAvatar/Image.asset 표시
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Poem

귀 쫑긋, 깡충! 프로필 고른 날,
아이콘 아홉, 내 맘의 달.
숫자 하나로 길 찾는 발걸음,
가족 발자취도 함께 묶어듦.
퐁당 저장, 살포시 로드—
오늘도 토끼는 코드에 hop! 🥕

Tip

🔌 Remote MCP (Model Context Protocol) integration is now available!

Pro plan users can now connect to remote MCP servers from the Integrations page. Connect with popular remote MCPs such as Notion and Linear to add more context to your reviews and chats.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Free

💡 Knowledge Base configuration:

  • Jira integration is disabled
  • Linear integration is disabled

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between 53ef2b2 and 22e286b.

📒 Files selected for processing (10)
  • frontend/ongi/lib/screens/health/family_step_tracker_screen.dart (3 hunks)
  • frontend/ongi/lib/screens/home/home_ourfamily_text.dart (2 hunks)
  • frontend/ongi/lib/screens/mypage/mypage_myinfo.dart (3 hunks)
  • frontend/ongi/lib/screens/photo/detail_record_screen.dart (1 hunks)
  • frontend/ongi/lib/screens/photo/photo_date_screen.dart (13 hunks)
  • frontend/ongi/lib/screens/signup/mode_screen.dart (3 hunks)
  • frontend/ongi/lib/screens/signup/profilepic_screen.dart (4 hunks)
  • frontend/ongi/lib/services/login_service.dart (1 hunks)
  • frontend/ongi/lib/services/signup_service.dart (2 hunks)
  • frontend/ongi/lib/utils/prefs_manager.dart (3 hunks)

Note

🎁 Summarized by CodeRabbit Free

Your organization is on the Free plan. CodeRabbit will generate a high-level summary and a walkthrough for each pull request. For a comprehensive line-by-line review, please upgrade your subscription to CodeRabbit Pro by visiting https://app.coderabbit.ai/login.

🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.

Support

Need help? Join our Discord community for assistance with any issues or questions.

CodeRabbit Commands (Invoked using PR/Issue comments)

Type @coderabbitai help to get the list of available commands.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Status, Documentation and Community

  • Visit our Status Page to check the current availability of CodeRabbit.
  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

@surfwithus surfwithus merged commit eea9cfb into main Aug 18, 2025
2 of 4 checks passed
@surfwithus surfwithus deleted the feat/pfp_image_api branch August 18, 2025 18:57
Neibce pushed a commit to 2025-PNU-SW-Hackathon/PNUSW-2025-OnGi-10 that referenced this pull request Aug 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant